Conversation
37ce9db to
9bc6ed0
Compare
|
Unsigned commits: 9bc6ed0. Please sign your commits. |
89c9026 to
82ee418
Compare
- Add ClientTestHarness and pinned Claude Code E2E acceptance test suite (praxis-proxy#871) covering deterministic multi-turn coding tasks over /v1/messages. - Enforce strict version assertion (CLAUDE_CODE_EXPECTED_VERSION = "0.2.29"). - Install pinned Claude Code CLI in integration test workflow (.github/workflows/integration.yaml). Signed-off-by: Artemy <ahladenk@redhat.com>
82ee418 to
51c9b2f
Compare
praxis-bot
left a comment
There was a problem hiding this comment.
Review: PR #978 — Pinned Claude Code acceptance test harness
Purpose: Add TempWorkspace harness and a pinned Claude Code E2E integration test that runs the CLI through Praxis's Anthropic Messages proxy.
Assessment: The test infrastructure has a sound structure, but the E2E test does not validate what it claims. The mock backend returns a plain text response (no tool_use blocks), so Claude Code cannot actually modify files in the workspace. The test pre-seeds result.txt with the expected content before launching Claude Code, then asserts on that pre-seeded content — making the workspace assertions tautological. Additionally, process isolation claims in the PR description ("process group SIGKILL cleanup") are not implemented in the code.
| Severity | Count | Summary |
|---|---|---|
| Critical | 1 | Test assertions verify pre-seeded data, not Claude Code behavior |
| Large | 3 | No exit status assertion; no process group isolation; IO error swallowed in harness |
| Medium | 2 | Doc comment version mismatch; inline comments in test bodies |
Non-inline findings
Medium — Inline comments in test bodies: Lines 56, 94, 97, 98, 111, 112, 129, 130 of claude_code.rs use // comments inside test function bodies. Project conventions require assertion messages or tracing calls instead. Replace each comment with either an assertion message on the nearest assert, or remove if the code is self-explanatory.
Medium — Busy-wait polling loop: The timeout loop (lines 112-122 of claude_code.rs) uses tokio::time::sleep(100ms) polling. Use tokio::process::Command with tokio::time::timeout for idiomatic async process management and cleaner timeout handling.
- Fix version mismatch in doc comment (v2.1.267) - Eliminate tautological pre-seeding and assert request/response flow against Anthropic Messages API spec - Add process group SIGKILL isolation and killpg termination on timeout - Capture and assert child exit status - Replace unwrap_or_default with expect in harness - Improve assertion error messages and remove inline comments per project conventions Signed-off-by: Artemy <ahladenk@redhat.com>
- Configure anthropic_messages_to_chat_completions_stream filter for streaming SSE responses - Serve ChatCompletions SSE events from mock backend matching Claude Code's streaming request mode - Fix CI acceptance test timeout Signed-off-by: Artemy <ahladenk@redhat.com>
leseb
left a comment
There was a problem hiding this comment.
P1: The latest commit regressed the core test. It now requests only “inspect and report,” serves text-only SSE, and asserts merely exit zero. The workspace verification helper is unused, so no edit, command execution, tool call, or multi-turn flow is proven (test, unused assertion).
P1: The pipeline still lacks /v1/messages → /v1/chat/completions path rewriting. The permissive mock hides that a real Chat Completions backend would receive the wrong path (pipeline).
P2: Backend::fixed sends the whole SSE response at once, so incremental streaming is not demonstrated.
P2: There is no egress lockdown, and the child inherits the runner environment; direct-provider prevention is not proven.
…th rewriting - Multi-turn tool execution: execute Bash tool call to update workspace result.txt and run ./verify.sh - Path rewriting: configure path_rewrite filter (/v1/messages -> /v1/chat/completions) and assert all forwarded requests target /v1/chat/completions - Environment isolation & egress lockdown: call .env_clear() and restrict child environment - Workspace assertion: invoke workspace.assert_successful_completion() to prove client tool execution and verification script pass - Content-type handling: auto-detect text/event-stream in StatefulCapturingBackend for SSE responses Signed-off-by: Artemy <ahladenk@redhat.com>
|
Addressed review findings in 46ccb22d7131ae13768f7f502ee2c9497e68fa70:
@leseb pls take a nother look, thanks! |
|
P1: The test pre-seeds result.txt with success. Claude only receives a Bash ./verify.sh call—no Read or Edit—so workspace verification remains tautological. |
praxis-bot
left a comment
There was a problem hiding this comment.
Re-review: PR #978 — Pinned Claude Code acceptance test harness
The PR was substantially rewritten since the initial review. Five of the six previous findings have been addressed: version constant corrected, exit status now asserted, process group isolation implemented, IO errors surfaced via expect(), and polling replaced with tokio::time::timeout. Good progress.
Two new Medium findings on the updated code.
| Severity | Count | Summary |
|---|---|---|
| Medium | 1 | Piped stdout/stderr never drained — potential child deadlock |
| Medium | 1 | Git workspace init errors silently swallowed |
…n, payload assertions, incremental SSE, and egress lockdown Signed-off-by: Artemy <ahladenk@redhat.com>
|
@leseb Addressed all review findings in commit
|
|
@Artemon-line lint fails |
Signed-off-by: Artemy <ahladenk@redhat.com>
…s in harness Signed-off-by: Artemy <ahladenk@redhat.com>
… coverage stability Signed-off-by: Artemy <ahladenk@redhat.com>
Head branch was pushed to by a user without write access
Summary
Implements
ClientTestHarness(tests/integration/tests/suite/harness.rs) and a pinned Claude Code E2E acceptance suite (tests/integration/tests/suite/claude_code.rs).2.1.267and multi-turn coding task completion through Praxis Anthropic Messages API (/v1/messages).anthropic_messages_to_chat_completionsandanthropic_messages_to_chat_completions_streamfilter pipeline to bridge streaming Claude Code requests (stream: true) to ChatCompletions SSE backends..process_group(0)) and SIGKILL group termination (killpg) on timeout with child process exit status verification (status.success()).TempWorkspaceharness and surfaces exact IO errors on workspace file reads.@anthropic-ai/claude-code@2.1.267in integration test workflow (.github/workflows/integration.yaml).Closes #871
Validation
cargo test -p praxis-tests-integration --test suite claude_code(2 passed)PRAXIS_TEST_CLAUDE_CODE_BIN=claude cargo test -p praxis-tests-integration --test suite claude_code(2 passed)cargo clippy --workspace --all-targets -- -D warnings(passed)cargo +nightly fmt --all -- --check(passed)Checklist
Signed-off-bytrailer.Breaking changes
No breaking change.